package com.example.streamsqlpark.entity;

import lombok.Data;
import org.apache.streampark.shaded.com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.List;

/**
 * @author voloiono
 * @date 2024/4/19 11:38
 */
@Data
public class JobOverview implements Serializable {
    private List<Job> jobs;
    public static class Job implements Serializable{
        @JsonProperty("jid")
        private String id;

        private String name;
        private String state;

        @JsonProperty("start-time")
        private Long startTime;

        @JsonProperty("end-time")
        private Long endTime;

        private Long duration;

        @JsonProperty("last-modification")
        private Long lastModification;

        private Task tasks;
    }

    @Data
    public static class Task implements Serializable {
        private int total;
        private int created;
        private int scheduled;
        private int deploying;
        private int running;
        private int finished;
        private int canceling;
        private int canceled;
        private int failed;
        private int reconciling;
    }
}
